<template>
  <j-modal
    :title="title"
    :width="modalWidth"
    :visible="visible"
    :bodyStyle="bodyStyle"
    style="top: 0px;"
    @cancel="handleCancel"
    :footer="null"
    cancelText="关闭">
    <k-form-design 
    :showHead="false" 
    @save="handleSave"
    :toolbars="['save', 'preview', 'importJson', 'reset' ]"/>
  </j-modal>
</template>

<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: "DesignForm",
    mixins:[JeecgListMixin],
    components: {
    },
    data () {
      return {
        bodyStyle:{
          height: '100%'
        },
        modalWidth:800,
        title: '',
        description: '表单设计页面',
        full:true,
        visible: false,
      }
    },
    computed: {
      
    },
    created () {
      this.modalWidth = window.innerWidth-0;
    },
    methods: {
      loadData(arg) {},
      close() {
        let that = this;
        this.$confirm({
          title: '提示信息',
          content: '请确认是否保存，未保存信息将会丢失',
          onOk() {
            that.$emit('close')
            that.visible = false
          },
          onCancel() {},
        });
      },

      handleSave(values) {
        alert(values);
      },
      handleCancel () {
        this.close()
      }
    }
  }
</script>